package cn.zzdt4j.config.service.biz;

import cn.zzdt4j.config.model.biz.threadpool.ThreadPoolDelReqDTO;
import cn.zzdt4j.config.model.biz.threadpool.ThreadPoolQueryReqDTO;
import cn.zzdt4j.config.model.biz.threadpool.ThreadPoolRespDTO;
import cn.zzdt4j.config.model.biz.threadpool.ThreadPoolSaveOrUpdateReqDTO;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * The interface Thread pool service.
 *
 * @author by <a href="mailto:ligang941012@gmail.com">gang.Li</a>
 * @since 2023 /11/7 21:54
 */
public interface ThreadPoolService {
    /**
     * Gets thread pool by item id.
     *
     * @param itemId the item id
     * @return the thread pool by item id
     */
    List<ThreadPoolRespDTO> getThreadPoolByItemId(String itemId);

    /**
     * Query thread pool page page.
     *
     * @param reqDTO the req dto
     * @return the page
     */
    IPage<ThreadPoolRespDTO> queryThreadPoolPage(ThreadPoolQueryReqDTO reqDTO);

    /**
     * Gets thread pool.
     *
     * @param reqDTO the req dto
     * @return the thread pool
     */
    ThreadPoolRespDTO getThreadPool(ThreadPoolQueryReqDTO reqDTO);

    /**
     * Alarm enable.
     *
     * @param id      the id
     * @param isAlarm the is alarm
     */
    void alarmEnable(String id, Integer isAlarm);

    /**
     * Save or update thread pool config.
     *
     * @param identify the identify
     * @param reqDTO   the req dto
     */
    void saveOrUpdateThreadPoolConfig(String identify, ThreadPoolSaveOrUpdateReqDTO reqDTO);

    /**
     * Delete pool.
     *
     * @param reqDTO the req dto
     */
    void deletePool(ThreadPoolDelReqDTO reqDTO);
}
